package request

type TestPostRequest struct {
	// required 表示必填字段
	Name string `json:"name" binding:"required"`
	Age  int    `json:"age"`
	// 必须是邮箱格式
	Email string `json:"email" binding:"required,email"`
}

type TestGetRequest struct {
	// required 表示必填字段
	Name string `form:"name" json:"name" binding:"required"`
	Page int    `form:"page" json:"page"`
}

type CreateUrlMapRequest struct {
	// required 表示必填字段
	LongUrl     string `form:"longUrl" json:"longUrl" binding:"required"`
	Description string `form:"description" json:"description"`
	Source      string `form:"source" json:"source" binding:"required"`
	Creator     string `form:"creator" json:"creator" binding:"required"`
}

type ReplaceUrlMapRequest struct {
	Id          int64  `form:"id" json:"id" binding:"required"`
	LongUrl     string `form:"longUrl" json:"longUrl" binding:"required"`
	Description string `form:"description" json:"description"`
	Editor      string `form:"editor" json:"editor" binding:"required"`
}

type ShortUrlStatisticsRequest struct {
	//统计日期
	StartStatisticsDate string `form:"startStatisticsDate" json:"startStatisticsDate"`
	//统计日期
	EndStatisticsDate string `form:"endStatisticsDate" json:"endStatisticsDate"`
	//短链id
	ShortUrlId int64 `form:"shortUrlId" json:"shortUrlId" binding:"required"`
	PageNum    int   `form:"pageNum" json:"pageNum" binding:"required"`
	PageSize   int   `form:"pageSize" json:"pageSize" binding:"required"`
}

type UrlMapPageMapRequest struct {
	ShortUrl    string `form:"shortUrl" json:"shortUrl"`
	LongUrl     string `form:"longUrl" json:"longUrl"`
	Description string `form:"description" json:"description"`
	Editor      string `form:"editor" json:"editor"`
	Creator     string `form:"creator" json:"creator"`
	Source      string `form:"source" json:"source" binding:"required"`
	PageNum     int    `form:"pageNum" json:"pageNum" binding:"required"`
	PageSize    int    `form:"pageSize" json:"pageSize" binding:"required"`
}

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type RegisterRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}
